<?php
// $Id$

/**
 * Controller_Admin_Profession 控制器
 */
class Controller_Admin_Profession extends Controller_Abstract
{

	function actionAdd()
	{
        try {
            $newProfession = Profession::saveData($_POST);
            $res = array(
                'ack' => 'success',
                'newProfession' => array(
                    'name' => $newProfession->name,
                    'profession_id' => $newProfession->id(),
                )
            );
        } catch (Exception $e) {
            $res = array(
                'ack' => 'error',
                'msg' => $e->getMessage(),
            );
        }

        return json_encode($res);
	}
}


